﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tetris.Model
{
    public delegate void CollectionLineDeleted(int x);

    public class BlockCollectionModel : CollectionModel<IBlockModel>
    {
        public event CollectionLineDeleted CollectionLineDeleted;

        public void DeleteLine(int x)
        {
            this.Delete( b => b.Top == x );

            if (CollectionLineDeleted != null)
            {
                this.CollectionLineDeleted(x);  //to tez powinno byc robione przez Dispatchera
            }
        }
    }
}
